export const mockData = (params?: any) => {
  if (params) {
    return new Promise((r) =>
      r({
        statusCode: '1000',
        result: 'OK',
        message: '请求成功',
        data: {
          title: {
            minDeclareElectricty: '5', //最小申报电量
            contractPriceLimit: 10, //合约价格上限
            contractPriceLowerLimit: 555.55, //合约价格下限
            spotOperatingDay: '0731', // 现货运行日
            minCapacity: '20', //最小电量
            minEletricPrice: '20', //最小电价
            tradedElectricity: '473', //成交电量
            listingElectricity: '473', //挂牌电量
          },
          windowSelect: [
            {
              windowId: 1,
              windowName: '测试窗口名称1',
            },
            {
              windowId: 2,
              windowName: '测试窗口名称2',
            },
            {
              windowId: 3,
              windowName: '测试窗口名称3',
            },
          ],
          list: [
            {
              id: 1, //主键
              scenarioName: '方案名',
              tradeLimit: '473', //交易上限
              tradedElectricity: '473', //已成交电量
              listingElectricity: '473', //挂牌电量
              surplusTradeLimit: '473', //剩余可交易上限
              dealNum: '475', //可成交笔数
              dealAvgPrice: '20', //成交均价
              marketId: '45073001',
              stationName: '源征风电场',
              markDate: '20251212-20251212',
              reportTime: '20251212 12:00-12:00',
              priceRange: '1~1', //价格范围,
              quantityRange: '1~1', //电量范围,
              totalDelisted: '1', //摘牌总理,
            },
            {
              id: 2, //主键
              scenarioName: '方案名22',
              tradeLimit: '473', //交易上限
              tradedElectricity: '473', //已成交电量
              listingElectricity: '473', //挂牌电量
              surplusTradeLimit: '473', //剩余可交易上限
              dealNum: '475', //可成交笔数
              dealAvgPrice: '20', //成交均价
              marketId: '45073001',
              stationName: '源征风电场',
              markDate: '20251212-20251212',
              reportTime: '20251212 12:00-12:00',
              priceRange: '2~8', //价格范围,
              quantityRange: '2~100', //电量范围,
              totalDelisted: '5555', //摘牌总理,
            },
          ],
        },
      }),
    );
  }
};

export const mockData2 = ({ data }: { data: number }) => {
  if (data) {
    return new Promise((r) =>
      r({
        statusCode: '1000',
        result: 'OK',
        message: '请求成功',
        data: [
          {
            id: 1,
            marketId: 'XXXX',
            windowName: 'xxxx',
            markDate: '20251212-20251212',
            reportTime: '20251212 12:00-12:00',
          },
          {
            id: 2,
            marketId: 'XXXX',
            windowName: 'xxxx',
            markDate: '20251212-20251212',
            reportTime: '20251212 12:00-12:00',
          },
        ],
      }),
    );
  }
};

// 方案数据
/* const cardListData: CardDataType[] = [
    {
      id: '1',
      windowName: '方案一',
      data: {
        maxTradeLimit: '473.130',
        tradedPower: '473.130',
        listedPower: '473.130',
        remainTradeLimit: '473.130',
        tradeCount: '30',
        averagePrice: '473.130'
      },
      details: {
        tradingUnit: '源征风电场',
        marketRange: '20250701-20250731',
        declarationTime: '20250731 12:00:00',
        priceRange: '1.0~1.2',
        quantityRange: '1.0~1.2',
        totalDelisted: '473.120'
      }
    },
    {
      id: '2',
      windowName: '方案二',
      data: {
        maxTradeLimit: '473.130',
        tradedPower: '473.130',
        listedPower: '473.130',
        remainTradeLimit: '473.130',
        tradeCount: '30',
        averagePrice: '473.130'
      },
      details: {
        tradingUnit: '源征风电场',
        marketRange: '20250701-20250731',
        declarationTime: '20250731 12:00:00',
        priceRange: '1.0~1.2',
        quantityRange: '1.0~1.2',
        totalDelisted: '473.120'
      }
    },
    {
      id: '3',
      windowName: '方案三',
      data: {
        maxTradeLimit: '473.130',
        tradedPower: '473.130',
        listedPower: '473.130',
        remainTradeLimit: '473.130',
        tradeCount: '30',
        averagePrice: '473.130'
      },
      details: {
        tradingUnit: '源征风电场',
        marketRange: '20250701-20250731',
        declarationTime: '20250731 12:00:00',
        priceRange: '1.0~1.2',
        quantityRange: '1.0~1.2',
        totalDelisted: '473.120'
      }
    },
    {
      id: '4',
      windowName: '方案四',
      data: {
        maxTradeLimit: '473.130',
        tradedPower: '473.130',
        listedPower: '473.130',
        remainTradeLimit: '473.130',
        tradeCount: '30',
        averagePrice: '473.130'
      },
      details: {
        tradingUnit: '源征风电场',
        marketRange: '20250701-20250731',
        declarationTime: '20250731 12:00:00',
        priceRange: '1.0~1.2',
        quantityRange: '1.0~1.2',
        totalDelisted: '473.120'
      }
    }
  ]; */
